﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="case_in.aspx.cs" Inherits="case_in" %>

<%@ Register Assembly="aspnetpager" Namespace="Wuqi.Webdiyer" TagPrefix="Webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="css/NewCss.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/bxslider/jquery.bxslider.js" type="text/javascript"></script>
    <link href="Scripts/bxslider/jquery.bxslider.css" rel="stylesheet" />  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<div id="All-Table">
  <div id="Title-Line">
    <h2>熱門案件</h2>
  </div>
<asp:Panel ID="pnlUI" runat="server">
  <div id="Case-Stitle">
      <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label></div>
  <table border="0" cellpadding="0" cellspacing="0" class="Case-Stable">
    <tr>
      <td width="604" valign="top">
      <div id="Case-InBpp" >
          <asp:Image ID="imgPicFileName" runat="server" Width="570" Height="380" /></div>
          <div style="width:560px;float:left;padding-left:5px;">
        <div id="Case-INSpp" class="bxSlider" >
            <asp:Repeater ID="RepeaterImg" runat="server" >
                <ItemTemplate>
                    <div class="slide"><img src="upload/<%# Eval("PicFileName")%>" width="124" height="83" /></div>
                </ItemTemplate>
            </asp:Repeater>
        </div>
              </div>
      </td>
      <td width="374" valign="top"><div id="Case-InNumber">案件編號  <asp:Label ID="lblCaseNo" runat="server" Text=""></asp:Label></div>
        <div class="Case-InStitle"><span class="Case-Institle-B">活</span>動期間</div>
        <div class="Case-InOb">
            <asp:Label ID="lblActDate" runat="server" Text=""></asp:Label></div>
        <div class="Case-InStitle"><span class="Case-Institle-B">店</span>　　家</div>
        <div class="Case-InOb">
            <asp:Label ID="lblCustomField3" runat="server" Text=""></asp:Label></div>
        <div class="Case-InStitle"><span class="Case-Institle-B">地</span>　　段</div>
        <div class="Case-InOb"><asp:Label ID="lblCustomField1" runat="server" Text=""></asp:Label></div>
        <div class="Case-InStitle"><span class="Case-Institle-B">看</span>　板　數</div>
        <div class="Case-InOb">
            <asp:Label ID="lblCustomField2" runat="server" Text=""></asp:Label></div>
        <div id="Case-InPrice">
            <asp:Label ID="lblPrice" runat="server" Text=""></asp:Label></div>
        <div id="Case-Day">競標起迄日：<asp:Label ID="lblBidDate" runat="server" Text=""></asp:Label>
            <%--<br />倒數天數　：10天6小時10分鐘--%></div></td>
    </tr>
    <tr>
      <td height="37" valign="top">&nbsp;</td>
      <td valign="bottom">
          <asp:LinkButton ID="aCollection" runat="server" OnClick="aCollection_Click"><div class="Btn-New1">我要收藏</div></asp:LinkButton>
          <asp:LinkButton ID="aCancelCollection" Visible="false" runat="server" OnClientClick="return confirm('取消收藏?')" OnClick="aCancelCollection_Click"><div class="Btn-New1">取消收藏</div></asp:LinkButton>
      </td>
    </tr>
  </table>
</asp:Panel>
<asp:Panel ID="pnlBidUI" runat="server">
  <table border="0" cellpadding="0" cellspacing="0" id="Case-bidding">
    <tr>
      <td width="506">&nbsp;</td>
      <td width="138">
          <asp:TextBox ID="txtBidPrice" runat="server" MaxLength="9" CssClass="Case-order" ValidationGroup="Bid" ></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="請輸入投標金額"
                  ControlToValidate="txtBidPrice" Display="None" ValidationGroup="Bid"></asp:RequiredFieldValidator>      
          <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="投標金額最少必須等於起標價或是高於目前出價"
                            ControlToValidate="txtBidPrice" MaximumValue="999999999" MinimumValue="1" Type="Integer"
                            Display="None" ValidationGroup="Bid"></asp:RangeValidator>
      </td>
      <td width="338"><asp:LinkButton ID="aBidding" runat="server" OnClick="aBidding_Click" ValidationGroup="Bid"><strong>確定競標</strong></asp:LinkButton></td>
    </tr>
  </table>
</asp:Panel>

  <div id="Title-Line2">
    <h2>熱門案件</h2>
</div>
  <div id="Case-PP"></div>
    <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
        <ItemTemplate>
            <div class="Case-table-purple">
    <div class="Case-number">案件編號  <%# Eval("CaseNo")%></div>    
    <div class="Case-Title"><%# Eval("Title")%></div>
    <div class="Case-Price">競標金額：<%# Eval("GetStr_BidPrice")%></div>
    <div class="Case-BPP"><a href="case_in.aspx?id=<%# Eval("PostId") %>"><img src="upload/<%# Eval("PicFileName")%>" width="205" height="250" /></a></div>
    <table border="0" cellpadding="0" cellspacing="3" class="Case-iconTable">
      <tr>
        <td width="15"><img src="image/case-icon1.png" width="15" height="14" /></td>
        <td width="35"><%# Eval("Collection") %></td>
        <td width="19"><img src="image/case-icon2.png" width="19" height="11" /></td>
        <td width="35"><%# Eval("Viewer") %></td>
        <td width="98" align="right">
            <asp:HyperLink ID="aFB" runat="server" Target="_blank"><img src="image/case-icon5.png" width="15" height="15" /></asp:HyperLink> <asp:HyperLink ID="aGoogle" runat="server" Target="_blank"><img src="image/case-icon4.png" width="14" height="14" /></asp:HyperLink> <asp:HyperLink ID="aTwitter" runat="server" Target="_blank"><img src="image/case-icon3.png" width="14" height="14" /></asp:HyperLink></td>
      </tr>
    </table>
  </div>
        </ItemTemplate>
    </asp:Repeater>  

    <div id="PageNumber">
        <Webdiyer:AspNetPager ID="AspNetPager1" runat="server" Height="28px"
            OnPageChanged="AspNetPager1_PageChanged" PageIndexBoxType="TextBox" PageSize="8"
            ShowPageIndexBox="Never" ShowFirstLast="true"
            FirstPageText="<p class='PageNumber-01'>第一頁</p>" LastPageText="<p class='PageNumber-01'>最末頁</p>"
            PrevPageText="<p class='PageNumber-01'>上一頁</p>" NextPageText="<p class='PageNumber-01'>下一頁</p>" NumericButtonTextFormatString="<p class='PageNumber-01'>{0}</p>" />
    </div>
</div>
    <asp:HiddenField ID="hdnId" runat="server" />
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="Bid" 
        ShowMessageBox="True" ShowSummary="False"/>
<script type="text/javascript">
    $(document).ready(initial());
    function initial() {
        initBxSlider();

        $("#Case-INSpp").on("click", "img", function () {
            $('#ctl00_ContentPlaceHolder2_imgPicFileName').attr('src', $(this).attr('src'));
        });
    }
    function initBxSlider() {
        $('.bxSlider').bxSlider({
            slideWidth: 140,
            minSlides: 4,
            maxSlides: 4,
            pager: false,
            //auto: true,
            speed: 3000
        });
    }

</script>
</asp:Content>

